#ifndef	PPINC																																																																																																																																																																																																																																																														
#define	_ATMEGA168	// device select: _ATMEGAxxxx																																																																																																																																																																																																																																																													
#define	_B1024	// boot size select: _Bxxxx (words), powers of two only																																																																																																																																																																																																																																																													
#ifdef	__ICCAVR__																																																																																																																																																																																																																																																														
#include	"iom168.h"																																																																																																																																																																																																																																																														
#endif																																																																																																																																																																																																																																																															
#if	__GNUC__																																																																																																																																																																																																																																																														
#include	<avr/io.h>																																																																																																																																																																																																																																																														
#endif																																																																																																																																																																																																																																																															
																																																																																																																																																																																																																																																														
/* baud rate register value calculation */																																																																																																																																																																																																																																																															
#define	CPU_FREQ	4000000																																																																																																																																																																																																																																																													
#define	BAUD_RATE	19200																																																																																																																																																																																																																																																													
#define	BRREG_VALUE	(CPU_FREQ/(BAUD_RATE*16l)-1l)																																																																																																																																																																																																																																																													
																																																																																																																																																																																																																																																															
/* definitions for UART control */																																																																																																																																																																																																																																																															
#define	BAUD_RATE_LOW_REG	UBRR0L																																																																																																																																																																																																																																																													
#define	UART_CONTROL_REG	UCSR0B																																																																																																																																																																																																																																																													
#define	ENABLE_TRANSMITTER_BIT	TXEN0																																																																																																																																																																																																																																																													
#define	ENABLE_RECEIVER_BIT	RXEN0																																																																																																																																																																																																																																																													
#define	UART_STATUS_REG	UCSR0A																																																																																																																																																																																																																																																													
#define	TRANSMIT_COMPLETE_BIT	TXC0																																																																																																																																																																																																																																																													
#define	RECEIVE_COMPLETE_BIT	RXC0																																																																																																																																																																																																																																																													
#define	UART_DATA_REG	UDR0																																																																																																																																																																																																																																																													
																																																																																																																																																																																																																																																															
/* definitions for SPM control */																																																																																																																																																																																																																																																															
#define	SPMCR_REG	SPMCSR																																																																																																																																																																																																																																																													
#define	PAGESIZE	128																																																																																																																																																																																																																																																													
#define	APP_END	14336																																																																																																																																																																																																																																																													
//#define	LARGE_MEMORY																																																																																																																																																																																																																																																														
																																																																																																																																																																																																																																																															
/* definitions for device recognition */																																																																																																																																																																																																																																																															
#define	PARTCODE																																																																																																																																																																																																																																																														
#define	SIGNATURE_BYTE_1	0x1E																																																																																																																																																																																																																																																													
#define	SIGNATURE_BYTE_2	0x94																																																																																																																																																																																																																																																													
#define	SIGNATURE_BYTE_3	0x06																																																																																																																																																																																																																																																													
																																																																																																																																																																																																																																																															
/* indicate that preprocessor result is included */																																																																																																																																																																																																																																																															
#define	PPINC																																																																																																																																																																																																																																																														
#endif																																																																																																																																																																																																																																																															
																																																																																																																																																																																																																																																	


//fixes for eeprom reg names
#ifdef _ATMEGA168
#define EEWE EEPE
#define EEMWE EEMPE
#endif
